Apparatus for encoding and decoding image using adaptive dct coefficient scanning based on pixel similarity and method therefor

ABSTRACT

The present invention discloses an encoding apparatus using a Discrete Cosine Transform (DCT) scanning, which includes: a mode selection means for selecting an optimal mode for intra prediction; an intra prediction means for performing intra prediction onto video inputted based on the mode selected in the mode selection means; a DCT and quantization means for performing DCT and quantization onto residual coefficients of a block outputted from the intra prediction means; and an entropy encoding means for performing entropy encoding onto DCT coefficients acquired from the DCT and quantization by using a scanning mode decided based on pixel similarity of the residual coefficients.

TECHNICAL FIELD

The present invention relates to an encoding/decoding apparatus andmethod using an adaptive Discrete Cosine Transform (DCT) coefficientscanning based on pixel similarity. More particularly, the presentinvention relates to an encoding/decoding apparatus and method whichperforms intra prediction onto input video, predicts pixel similaritybased on pixel similarity information of coefficients to be encoded thatis acquired from adjacent pixels in the intra-predicted video, andperforms a most effective scanning, e.g., Discrete Cosine Transform(DCT) coefficient scanning, according to the predicted pixel similarity.

BACKGROUND ART

According to video compression standards for encoding/decoding videodata, a frame is divided into a plurality of macro blocks and a macroblock may be divided into a plurality of sub-blocks. Theencoding/decoding is performed on the basis of a macro block unit or asub-block unit based on temporal prediction and spatial prediction.

Herein, the temporal prediction is to predict motion of macro blocks orsub-blocks of a current frame by referring to blocks of adjacent frames.

The spatial prediction is to predict motion of macro blocks orsub-blocks of a current frame to be encoded by using boundary pixels ofalready recovered adjacent blocks.

The spatial prediction is also called intra prediction. The intraprediction takes advantage of a characteristic that when a pixel ispredicted, pixels adjacent to it are highly likely to have similarvalues.

H.264/Advanced Video Coding (AVC) standard technology can compress videoabout twice as high as Moving Picture Experts Group 2 (MPEG-2) and aboutone and a half times as high as MPEG-4 by using such technique as intraprediction encoding, ¼-based variable block motion prediction andcompensation, Context-Based Adaptive Variable Length Coding (CAVLC), andContext-Based Adaptive Binary Arithmetic Coding (CABAL).

The H.264/AVC standard predicts pixel values of a current block by usingprediction modes of 9 directivities.

FIG. 1 illustrates 9 prediction modes used for intra prediction of 4×4blocks.

As illustrated in FIG. 1, the 9 prediction modes used for intraprediction of 4×4 blocks include a vertical mode (mode 0), a horizontalmode (mode 1), a direct current (DC) mode (mode 2), a diagonal_down leftmode (mode 3), a diagonal_down_right mode (mode 4), a vertical_rightmode (mode 5), a horizontal_down mode (mode 6), a vertical_left mode(mode 7), and a horizontal_up mode (mode 8).

Herein, in the DC mode (mode 2), intra prediction is performed using amean value of adjacent pixels. The arrows indicate predictiondirections.

Meanwhile, intra 16×16 prediction encoding includes a total of fourmodes, which are a vertical mode, a horizontal mode, a DC mode, and aplane mode.

Also, intra 8×8 prediction encoding includes a total of 9 modes, justlike the intra 4×4 prediction encoding. As for color difference signals,intra 8×8 prediction encoding is performed, and the intra 8×8 predictionencoding includes a DC mode, a vertical mode, a horizontal mode, and aplane mode and so on.

Hereinafter, prediction methods in the vertical and horizontal modes forintra prediction of 4×4 blocks will be described with reference to FIGS.2 and 3.

FIG. 2 exemplarily illustrates a pixel prediction method in a verticaldirection.

As shown in FIG. 2, pixel a 201, pixel b 202, pixel i 203, and pixel m204 are predicted based on an adjacent pixel A in the verticaldirection.

Also, pixels b, f, j and b are predicted based on an adjacent pixel B inthe vertical direction, and pixels c, g, k and o are predicted based onan adjacent pixel C in the vertical direction. Pixels d, h, l and p arepredicted based on an adjacent pixel D in the vertical direction.

FIG. 3 exemplarily illustrates a pixel prediction method in a horizontaldirection.

As illustrated in FIG. 3, pixel a 205, pixel b 206, pixel c 207, andpixel d 208 are predicted based on an adjacent pixel I in a horizontaldirection.

Also, pixels e, f, g and h are predicted based on an adjacent pixel J inthe horizontal direction, and pixels i, j, k and l are predicted basedon an adjacent pixel K in the horizontal direction. Pixels m, n, o and pare predicted based on an adjacent pixel l in the horizontal direction.

An encoder performs Discrete Cosine Transform (DCT) and quantizationonto residual signals (which are of a pixel area) acquired bydifferentiating the predicted pixels and a current pixel. Subsequently,the encoder performs zigzag scanning and entropy encoding onto thetransformed coefficients obtained from DCT and quantization.

Herein, although the zigzag scanning takes advantage of an energycompaction characteristic of a transformed coefficient that energyconverges onto low frequency and energy appears little in highfrequency, the energy compaction after intra prediction is not alwayseffective.

In short, the zigzag scanning is a method of scanning a transformedcoefficient from low frequency components to high frequency components.When distribution of transformed coefficients appears more in the lowfrequency components, the zigzag scanning is effective. However, whenspatial prediction having directivity is used, the distribution oftransformed coefficients is influenced by the direction of prediction.Therefore, it is ineffective to apply the zigzag scanning to theprediction of all directions.

DISCLOSURE Technical Problem

An embodiment of the present invention, which is devised to overcome theabove problems, is directed to providing an encoding/decoding apparatusand method which performs intra prediction onto input video, predictspixel similarity based on pixel similarity information of coefficientsto be encoded acquired from adjacent pixels in the intra-predictedvideo, and performs a most effective scanning, e.g., DCT coefficientscanning, according to the predicted pixel similarity.

Other objects and advantages of the present invention can be understoodby the following description, and become apparent with reference to theembodiments of the present invention. Also, it is obvious to thoseskilled in the art of the present invention that the objects andadvantages of the present invention can be realized by the means asclaimed and combinations thereof.

Technical Solution

In accordance with an aspect of the present invention, there is providedan encoding apparatus using a Discrete Cosine Transform (DCT) scanning,which includes: a mode selection means for selecting an optimal mode forintra prediction; an intra prediction means for performing intraprediction onto video inputted based on the mode selected in the modeselection means; a DCT and quantization means for performing DCT andquantization onto residual coefficients of a block outputted from theintra prediction means; and an entropy encoding means for performingentropy encoding onto DCT coefficients acquired from the DCT andquantization by using a scanning mode decided based on pixel similarityof the residual coefficients.

In accordance with another aspect of the present invention, there isprovided a decoding apparatus using a DCT scanning, which includes: anentropy decoding means for performing entropy decoding onto encodedvideo; a scanning decision means for deciding a scanning mode for thevideo decoded in the entropy decoding means; and a video recovery meansfor recovering the video based on the scanning mode decided in thescanning decision means.

In accordance with another aspect of the present invention, there isprovided an encoding method using a DCT scanning, which includes thesteps of: selecting an optimal mode for intra prediction; performingintra prediction onto video inputted based on the mode selected in themode selection step; performing DCT and quantization onto residualcoefficients of a block outputted from the intra prediction step;deciding pixel similarity of the residual coefficients; and performingentropy encoding onto DCT coefficients acquired from the DCT andquantization by using a scanning mode decided in the pixel similaritydecision step.

In accordance with an aspect of the present invention, there is provideda decoding method using a DCT scanning, which includes the steps of:performing entropy decoding onto encoded video; deciding a scanning modefor the video decoded in the entropy decoding step; and recovering thevideo based on the scanning mode decided in the scanning decision step.

According to an embodiment of the present invention, a luminance blockmay go through an intra 4×4 luminance encoding mode of H.264/AdvancedVideo Coding (AVC), which includes a vertical mode, a horizontal mode, adiagonal_down_left mode, a diagonal_down_right mode, a vertical_rightmode, a horizontal_down mode, a vertical_left mode, and a horizontal_upmode, and an intra 16×16 luminance encoding mode of H.264/AVC, whichincludes a vertical mode, a horizontal mode, a plane mode, and a DCmode.

Also, according to an embodiment of the present invention, a chrominanceblock may go through an intra M×N chrominance encoding mode ofH.264/AVC, which includes a vertical mode, a horizontal mode, a planemode and a DC mode.

ADVANTAGEOUS EFFECTS

As described above, the present invention can improve a compression rateof intra encoding by applying a most effective scanning method accordingto pixel similarity in order to encode/decode video.

Also, the present invention can improve a video compression rate bybeing applied to a video compression technology using intra prediction,which will be developed in future.

Also, the present invention can reduce a need for an additional moduleby applying the same similarity information to both encoder and decoder.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates 9 prediction modes used for intra prediction of 4×4blocks according to H.264/AVC.

FIG. 2 exemplarily illustrates a pixel prediction method in a verticalmode.

FIG. 3 exemplarily illustrates a pixel prediction method in a horizontaldirection.

FIG. 4 is a block view showing an encoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

FIG. 5 exemplarily illustrates a zigzag scanning method used in thepresent invention.

FIG. 6 exemplarily illustrates a horizontal scanning method used in thepresent invention.

FIG. 7 exemplarily illustrates a vertical scanning method used in thepresent invention.

FIG. 8 illustrates a method for predicting pixel similarity in verticaland horizontal directions in accordance with an embodiment of thepresent invention.

FIG. 9 is a flowchart describing an adaptive scanning method based onpixel similarity in a vertical intra prediction mode in accordance withan embodiment of the present invention.

FIG. 10 is a flowchart describing an adaptive scanning method based onpixel similarity in a horizontal intra prediction mode in accordancewith an embodiment of the present invention.

FIG. 11 is a block view showing a decoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

BEST MODE FOR THE INVENTION

The advantages, features and aspects of the invention will becomeapparent from the following description of the embodiments withreference to the accompanying drawings, which is set forth hereinafter.When it is considered that detailed description on a related art mayobscure a point of the present invention, the description will not beprovided herein. Hereinafter, specific embodiments of the presentinvention will be described in detail with reference to the accompanyingdrawings.

FIG. 4 is a block view showing an encoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

As illustrated in FIG. 4, the encoding apparatus based on DCTcoefficient scanning adaptive to pixel similarity includes a modeselection unit 10, an intra prediction unit 20, a DCT and quantizationunit 30, and an entropy encoding unit 40.

The mode selection unit 10 selects an optimal mode among severalavailable prediction modes for intra prediction. In other words, itselects one among a plurality of possible encoding modes when 4×4,16×16, or 8×8 intra prediction is performed. Generally, the modeselection unit 10 selects one mode according to a rate-distortionoptimization method for reducing a rate-distortion.

The intra prediction unit 20 receives a video, and performs 4×4 intraprediction for pixels of luminance blocks and 8×8 intra prediction forpixels of chrominance blocks based on a mode selected in the modeselection unit 10.

The DCT and quantization unit 30 performs DCT and quantization ontodifference values outputted from the mode selection unit 10, that is,onto residual coefficient blocks indicating differences between pixelvalues of macro blocks of a current frame to be encoded and predictedpixel values, and transmits resulting coefficients to the entropyencoding unit 40.

The entropy encoding unit 40 arrays DCT coefficients obtained in the DCTand quantization unit 30 by using an adaptive DCT coefficient scanningbased on pixel similarity, performs entropy encoding onto the arrayedDCT coefficients, and outputs the result.

Herein, the entropy encoding is an encoding technique for enhancing acompression rate by allocating small bits to data highly likely to occurand many bits for data that are not likely to occur. Examples of theentropy encoding used in the present invention include Context AdaptiveVariable Length Coding (CAVLC) or Context-Based Adaptive BinaryArithmetic Coding (CABAL).

With reference to FIGS. 8 to 10, described hereafter are a method ofpredicting pixel similarity in vertical and horizontal directions in theentropy encoding unit 40, and a scanning method in vertical andhorizontal intra prediction modes.

FIG. 5 exemplarily illustrates a typical zigzag scanning method used inthe present invention. FIG. 6 exemplarily illustrates a typicalhorizontal scanning method used in the present invention. FIG. 7exemplarily illustrates a typical vertical scanning method used in thepresent invention.

As shown in FIG. 5, the zigzag scanning method used in the presentinvention is devised in consideration that low frequency components oftransformed coefficient acquired from the DCT and quantization arehighly likely to be positioned in the upper left part on atwo-dimensional plane. It takes advantage of a transformed coefficientenergy compaction characteristic that coefficients after DCTcollectively appear in low frequencies, whereas coefficients after DCTless appear in high frequencies.

The zigzag scanning method may be more efficient when pixel similarityin the horizontal direction is similar to the pixel similarity in thevertical direction.

However, when intra prediction encoding, particularly, vertical orhorizontal intra prediction, is performed, the similarity of theresidual coefficients in the vertical direction shows much differencefrom the similarity in the horizontal direction. Thus, theabove-described coefficient distribution is not always effective.Therefore, it is inefficient to apply the zigzag scanning to predictionof all directions.

To describe an example of the vertical prediction mode, the verticalprediction mode is selected as an optimal mode in a rate-distortionprocess, when the pixel similarity in the vertical direction is high.Herein, significant coefficients are distributed in the first row.Therefore, the horizontal scanning shown in FIG. 6 is more efficientthan the typical zigzag scanning.

Meanwhile, to describe an example of the horizontal prediction mode, thehorizontal prediction mode is selected as an optimal mode, when thepixel similarity in the horizontal direction is high. Herein,significant coefficients are distributed in the first column. Therefore,the vertical scanning shown in FIG. 7 is more efficient.

However, since the pixel similarity before intra prediction is differentfrom pixel similarity of residual coefficients after the intraprediction, it is inefficient to simply use the scanning method of FIG.6 or FIG. 7 according to the intra prediction mode.

Therefore, if pixel similarities in the vertical and horizontaldirections of blocks around a block to be encoded are predicted based onsimilarity information among adjacent block boundary pixels which arealready recovered and an adaptive scanning method according to theprediction result is used, the encoding efficiency can be increased.

FIG. 8 illustrates a method for predicting pixel similarity in verticaland horizontal directions in accordance with an embodiment of thepresent invention.

As illustrated in FIG. 8, pixels A, B, C and D are positioned in theupper part of a current block to be encoded, whereas pixels E, F, G andH are positioned in the left part of the current block to be encoded.

Herein, when vertical prediction encoding is performed,vertical-directional pixel similarity of the pixels a, e, i and m arepositioned in a first row of the current block to be encoded is the sameas the vertical-directional pixel similarity of residual coefficientsa-A, e-A, i-A, and m-A after vertical prediction. This is because theresidual coefficients a-A, e-A, i-A, and m-A are differentiated by thesame prediction pixels as the pixels a, e, i and m and thus thecorrelation does not change.

As described above, the vertical-directional pixel similarity of pixelsin 2, 3 and 4 rows of a block is the same as the vertical-directionalpixel similarity of residual coefficients after vertical prediction.

However, the horizontal-directional pixel similarity of the 1-row pixelsa, b, c and d of the current block to be encoded is different from thehorizontal-directional pixel similarity of residual coefficients a-A,b-B, c-C, and d-D after vertical prediction. Also,horizontal-directional pixel similarity before vertical predictionbecomes higher than the horizontal-directional pixel similarity afterthe vertical prediction. Thus, it becomes similar to or higher than thevertical-directional pixel similarity.

Likewise, in case of the horizontal prediction encoding,horizontal-directional pixel similarity of the pixels a, b, c and d in afirst row of a block is the same as the horizontal-directional pixelsimilarity of residual coefficients a-E, b-E, c-E, and d-E afterhorizontal prediction. Also, the horizontal-directional pixel similarityof the pixels in 2, 3 and 4 rows of the bock is the same as thehorizontal-directional pixel similarity of the residual coefficientsafter horizontal prediction.

However, the vertical-directional pixel similarity of the 1-row pixelsa, e, i and m of the block is different from the vertical-directionalpixel similarity of residual coefficients a-E, e-F, i-G, and m-H afterhorizontal prediction. Also, the vertical-directional pixel similaritybefore horizontal prediction becomes higher than thevertical-directional pixel similarity after the horizontal prediction.Thus, it becomes similar to or higher than the horizontal-directionalpixel similarity.

As described above, when the pixel similarities in the vertical andhorizontal directions become similar, a general zigzag scanning methodis more efficient than the horizontal and vertical scanning methods.

Therefore, when the vertical intra prediction mode is performed and thevertical-directional pixel similarity of residual coefficients is highand their horizontal-directional pixel similarity is low, it is moreefficient to use the horizontal scanning.

Meanwhile, when the horizontal intra prediction mode is performed andthe horizontal-directional pixel similarity of residual coefficients ishigh and their vertical-directional pixel similarity is low, it is moreefficient to use the vertical scanning.

When vertical-directional pixel similarity of recovered 8 pixels A, B,C, D, E, F, G and H of FIG. 8 is referred to as S_VER and theirhorizontal-directional pixel similarity is referred to as S_HOR, thepixel similarities for increasing the efficiency of 4×4 predictionencoding can be calculated as the following Equation 1.

$\begin{matrix}{{{S\_ VER} = \frac{1}{{Variance}\left( {E,F,G,H} \right)}}{{S\_ HOR} = \frac{1}{{Variance}\left( {A,B,C,D} \right)}}} & {{Equation}\mspace{14mu} 1}\end{matrix}$

where Variance( ) denotes a dispersion; E, F, G and H DENOTE pixelsadjacent to the left part of the current block to be encoded; and A, B,C and D denote pixels adjacent to the upper part of the current block tobe encoded.

When the vertical prediction mode is carried out, a value obtained bymultiplying S_HOR by a multiplication factor α (α≧1) is used as ahorizontal-directional pixel similarity prediction value of residualcoefficients of the current block. Herein, the α value is fixed at 2 inan experiment. The S_VER as it is used as a vertical-directional pixelsimilarity prediction value of the residual coefficients of the currentblock.

When the horizontal prediction mode is carried out, a value obtained bymultiplying S_VER by a multiplication factor β (β≧1) is used as avertical-directional pixel similarity prediction value of the residualcoefficients of the current block. Herein, the β value is fixed at 2 inan experiment. The S_HOR as it is used as a horizontal-directional pixelsimilarity prediction value of the residual coefficients of the currentblock.

The vertical and horizontal-directional pixel similarity predictionvalues acquired in the above methods are compared to each other todecide a scanning method.

Although the example of 4×4 intra prediction mode is described in theabove, the present invention is not limited to the mode and the presentinvention can be applied to an M×N intra prediction mode, too.

Hereinafter, a method of selecting a scanning method in the vertical andhorizontal prediction modes will be described in detail with referenceto FIGS. 9 and 10.

FIG. 9 is a flowchart describing an adaptive scanning method based onpixel similarity in a vertical intra prediction mode in accordance withan embodiment of the present invention.

In case of a vertical intra prediction mode in step S601, an S_VER valueand a value of α×S_HOR are compared in step S602. When the S_VER valueis greater than the value of α×S_HOR, a horizontal scanning method isused in step S603. When the S_VER value is smaller than the value ofα×S_HOR, a zigzag scanning method is used in step S604.

Herein, when a vertical-directional pixel similarity of the currentblock to be encoded based on similarity of adjacent pixels is predictedhigher than the horizontal-directional pixel similarity thereof,transformed coefficients obtained after DCT and quantization are highlylikely to be distributed in a direction horizontal to a first row of theblock. Therefore, the horizontal scanning method can bring about a highencoding efficiency.

FIG. 10 is a flowchart describing an adaptive scanning method based onpixel similarity in a horizontal intra prediction mode in accordancewith an embodiment of the present invention.

In case of a horizontal intra prediction mode in step S701, an S_HORvalue and a value of β×S_VER are compared in step S702. When the S_HORvalue is greater than the value of β×S_VER, a vertical scanning methodis used in step S703. When the S_HOR value is smaller than the value ofβ×S_VER, a zigzag scanning method is used in step S704.

Herein, when a horizontal-directional pixel similarity of the currentblock to be encoded based on similarity of adjacent pixels is predictedhigher than the vertical-directional pixel similarity thereof,transformed coefficients obtained after DCT and quantization are highlylikely to be disposed in a direction vertical to a first row of theblock. Therefore, the vertical scanning method can bring about a highencoding efficiency.

FIG. 11 is a block view showing a decoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

As shown in FIG. 11, the decoding apparatus using an adaptive DCTcoefficient scanning based on pixel similarity includes an entropydecoding unit 50, a scanning decision unit 60, and a video recovery unit70.

The entropy decoding unit 50 receives video bitstream encoded in theencoding apparatus using an adaptive DCT coefficient scanning based onpixel similarity and decodes it through an entropy decoding method suchas CAVLC or CABAC. Then, the entropy decoding unit 50 transmits theentropy-decoded video bitstream to the scanning decision unit 60.

The scanning decision unit 60 decides a scanning method for thecoefficients decoded in the entropy decoding unit 50 according to anintra prediction mode, as described in the above with reference to FIGS.8 to 11.

The video recovery unit 70 finally recovers the coefficients by usingthe scanning method decided in the scanning decision unit 60 to recoverthe video.

An experiments was carried out for diverse test videos by using JointModel 86 (JM86), which is H.264/AVC Reference Codec, according to theabove-described methods. The result of increase in compressionefficiency was as follows. In the experiment, video recommended byH.264/AVC as test video was used. The following Table 1 shows conditionsof the experiment.

TABLE 1 News Container Coast Paris Coast Video (QCIF) (QCIF) (QCIF)(QCIF) (CIF) Entire 300 300 300 300 300 Frame (30 Hz) (30 Hz) (30 Hz)(35 Hz) (30 Hz) Conditions CAVLC, Intra only, QP (18, 22, 26, 40), rate-distortion optimization

As shown in Table 1, five pieces of video with different sizes were usedfor the experiment.

The following Table 2 presents video compression rates when the testvideos were compressed using a conventional compression method, which isa zigzag scanning method of H.264/AVC, and the compression method of thepresent invention, which is the adaptive scanning method according tointra prediction mode under the same conditions as the Table 1.

TABLE 2 Method of the Present Bit H.264/AVC Invention Saving PSNR Bitrate PSNR Bit rate rate Sequence QP (dB) (Kbps) (dB) (Kbps) (%) News 1845.64 2370.65 45.64 2344.75 1.51% (QCIF) 22 43.06 1714.99 43.05 1692.691.67% 26 40.32 1221.96 40.32 1206.02 1.51% 30 37.50 872.65 37.49 860.231.49% Container 18 44.84 874.63 44.84 857.75 1.93% (QCIF) 22 41.71643.42 41.7 630.5 2.01% 26 38.61 451.07 38.61 441.54 2.11% 30 35.77317.36 35.76 309.93 2.34% Coast 18 44.18 2200.99 44.13 2152.15 2.22%(QCIF) 22 40.61 1631.56 40.59 1592.37 2.40% 26 37.13 1139.76 37.12111.02 2.52% 30 34.00 765.52 33.99 746.77 2.45% Paris 18 44.72 4360.4144.71 4271.09 2.05% (CIF) 22 41.57 3334.22 41.56 3259.84 2.23% 26 38.252450.69 38.24 2391.77 2.40% 30 35.04 1780.73 35.03 1736.21 2.50% Coast18 44.34 4068.4 44.33 4015.7 1.30% (CIF) 22 40.8 2989.5 40.8 2950.651.30% 26 37.32 2074.47 37.32 2045.89 1.38% 30 34.21 1388.07 34.221369.23 1.36%

The Table 2 shows that the result of video compression using theadaptive scanning method according to the intra prediction mode, whichis suggested in the present invention, is superior to that of videocompression using only the conventional zigzag scanning method ofH.264/AVC.

The method of the present invention described above may be realized as aprogram and stored in a computer-readable recording medium such asCD-ROM, RAM, ROM, floppy disks, hard disks, magneto-optical disks and sofourth. Since the process can be easily implemented by those skilled inthe art to which the present invention pertains to, further descriptionon it will not be provided herein.

While the present invention has been described with respect to certainpreferred embodiments, it will be apparent to those skilled in the artthat various changes and modifications may be made without departingfrom the scope of the invention as defined in the following claims.

1. An encoding apparatus using a Discrete Cosine Transform (DCT)scanning, comprising: a mode selection means for selecting an optimalmode for intra prediction; an intra prediction means for performingintra prediction onto video inputted based on the mode selected in themode selection means; a DCT and quantization means for performing DCTand quantization onto residual coefficients of a block outputted fromthe intra prediction means; and an entropy encoding means for performingentropy encoding onto DCT coefficients acquired from the DCT andquantization by using a scanning mode decided based on pixel similarityof the residual coefficients.
 2. The encoding apparatus of claim 1,wherein the scanning mode is any one among a horizontal-directionalscanning, a vertical-directional scanning, and a zigzag scanning.
 3. Theencoding apparatus of claim 2, wherein the entropy encoding means:performing encoding using a horizontal-directional scanning, whenvertical-directional pixel similarity of the residual signals is high;performing encoding using a vertical-directional scanning, whenhorizontal-directional pixel similarity of the residual signals is high;and performing encoding using a zigzag scanning, when vertical andhorizontal-directional pixel similarities of the residual signals aresimilar.
 4. The encoding apparatus of claim 3, wherein the entropyencoding means decides that the vertical-directional pixel similarity ishigh, when a vertical-directional pixel similarity value is greater thana value obtained by multiplying a horizontal-directional pixelsimilarity value by a first multiplication factor.
 5. The encodingapparatus of claim 3, wherein the entropy encoding means decides thatthe horizontal-directional pixel similarity is high, when ahorizontal-directional pixel similarity value is greater than a valueobtained by multiplying a vertical-directional pixel similarity value bya second multiplication factor.
 6. The encoding apparatus of claim 4,wherein the vertical-directional pixel similarity is calculated byperforming dispersion onto pixels adjacent to a left part of a currentlyencoded block.
 7. The encoding apparatus of claim 5, wherein thehorizontal-directional pixel similarity is calculated by performingdispersion onto pixels adjacent to an upper part of a currently encodedblock.
 8. The encoding apparatus of claim 6, wherein the first andsecond multiplication factors are natural number
 2. 9. A decodingapparatus using a DCT scanning, comprising: an entropy decoding meansfor performing entropy decoding onto encoded video; a scanning decisionmeans for deciding a scanning mode for the video decoded in the entropydecoding means; and a video recovery means for recovering the videobased on the scanning mode decided in the scanning decision means. 10.The decoding apparatus of claim 9, wherein the decided scanning mode isany one among a horizontal-directional scanning, a vertical-directionalscanning, and a zigzag scanning.
 11. An encoding method using a DCTscanning, comprising the steps of: selecting an optimal mode for intraprediction; performing intra prediction onto video inputted based on themode selected in the mode selection step; performing DCT andquantization onto residual coefficients of a block outputted from theintra prediction step; deciding pixel similarity of the residualcoefficients; and performing entropy encoding onto DCT coefficientsacquired from the DCT and quantization by using a scanning mode decidedin the pixel similarity decision step.
 12. The encoding method of claim11, wherein the decided scanning mode is any one among ahorizontal-directional scanning, a vertical-directional scanning, and azigzag scanning.
 13. The encoding method of claim 12, wherein theentropy encoding step includes the steps of: performing encoding using ahorizontal-directional scanning, when vertical-directional pixelsimilarity of the residual signals is high; performing encoding using avertical-directional scanning, when horizontal-directional pixelsimilarity of the residual signals is high; and performing encodingusing a zigzag scanning, when vertical and horizontal-directional pixelsimilarities of the residual signals are similar.
 14. The encodingmethod of claim 13, wherein the vertical-directional pixel similarity isdecided high in the entropy encoding step, when a vertical-directionalpixel similarity value is greater than a value obtained by multiplying ahorizontal-directional pixel similarity value by a first multiplicationfactor.
 15. The encoding method of claim 13, wherein thehorizontal-directional pixel similarity is decided high in the entropyencoding step, when a horizontal-directional pixel similarity value isgreater than a value obtained by multiplying a vertical-directionalpixel similarity value by a second multiplication factor.
 16. Theencoding method of claim 14, wherein the vertical-directional pixelsimilarity is calculated by performing dispersion onto pixels adjacentto a left part of a currently encoded block.
 17. The encoding method ofclaim 15, wherein the horizontal-directional pixel similarity iscalculated by performing dispersion onto pixels adjacent to an upperpart of a currently encoded block.
 18. The encoding method of claim 16,wherein the first and second multiplication factors are natural number2.
 19. A decoding method using a DCT scanning, comprising the steps of:performing entropy decoding onto encoded video; deciding a scanning modefor the video decoded in the entropy decoding step; and recovering thevideo based on the scanning mode decided in the scanning decision step.20. The decoding apparatus of claim 19, wherein the decided scanningmode is any one among a horizontal-directional scanning, avertical-directional scanning, and a zigzag scanning.